package com.leonzhangxf.ioc.bean.impl;

import com.leonzhangxf.ioc.bean.AbstractHierarchyService;
import com.leonzhangxf.ioc.bean.HelloWorldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author leonzhangxf
 * @date 20190604
 */
@Service
public class DefaultHierarchyService extends AbstractHierarchyService {

    protected HelloWorldService helloWorldService;

    @Override
    public void printChildrenInfo() {
        System.out.println("default");
        helloWorldService.helloWorld();
    }

    @Autowired
    public void setHelloWorldService(HelloWorldService helloWorldService) {
        this.helloWorldService = helloWorldService;
    }
}
